<template>
  <div id="app">
    <router-view/>
    <navbar></navbar>
    <back-top></back-top>
  </div>
</template>

<script>
import Vue from 'vue'
import Navbar from './components/navbar'
import BackTop from './components/backTop'

export default {
  name: 'App',
  components: { Navbar, BackTop },
  mounted () {
    let self = this
    // 统计访问量
    this.$http.simplePost('/beautyPageantController/recordVisitor', {serverToken: this.$token})  

    this.$http.simplePost('/beautyPageantController/judgeInApp', {serverToken: this.$token}).then(function (data) {  
      Vue.prototype.$inApp = data.inApp
      Vue.prototype.$url = data.url
    })
  }
}
</script>

<style>
html,body {
  height: 100%;
}
#app {
  font-family: '微软雅黑';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #fff;
  min-height: 100%;
  padding-bottom: 80px;
  background-color: #7a0bed;
  overflow-y: scroll;
}
#app>.main {
  position: relative;
  bottom: 120px;
  margin-top: 120px;
}
</style>
